
public class Context {
	public static void main(String[] args) {
		String v[] = {"a", "b", "d", "r", "y", "c", "f", "m"};
		
		System.out.println("Vectorul inainte de sortare ");
		for(int i=0; i<v.length; i++)
			System.out.print(v[i]+ " " );
		
		//Sortarea BubbleSort
		System.out.println("\n Vectorul dupa sortare BubbleSort ");

		SortingStrategy y;
		y = new BubbleSortStrategy();
		y.sort(v);
		for(int i=0; i<v.length; i++)
			System.out.print(v[i]+ " " );
		
		//Sortarea QuickSort
		System.out.println("\n Vectorul dupa sortare QuickSort ");

		SortingStrategy z;
		z = new QuickSortStrategy();
		z.sort(v);
		for(int i=0; i<v.length; i++)
			System.out.print(v[i]+ " " );
		
		//Sortarea clasica
		System.out.println("\n Vectorul dupa sortarea clasica ");

		SortingStrategy w;
		w = new SortStrategy();
		w.sort(v);
		for(int i=0; i<v.length; i++)
			System.out.print(v[i]+ " " );
	}
}
